const express = require("express")
const path = require("path")
const app = express()

app.use(express.static(path.join(__dirname, "public")))

app.get("/ajax", (req,res) => {
    res.send("hello ajax")
})

app.get("/get", (req, res) => {
    // res.send("我是带有参数的get请求")
    // get请求的参数在哪里？？ req.query
    console.log(req.query);
    res.send(`您已注册成功,您的用户名是${req.query.username},您的密码是${req.query.password}`)
})

let server = app.listen(3000, ()=>{
    console.log("服务运行在3000端口");
})